{template 'common/header'}
<div class="main">
	<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form1">
		<div class="panel panel-default" id="step1">
			<div class="panel-heading">
				游戏设置
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 标题</label>
					<div class="col-sm-9 col-xs-12">
						<input class="form-control" type="text" name="dat[name]" value="{$config['name']}" />
						<span class="help-block">编辑标题</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 头部logo</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image(hlogo,$config['hlogo'])}
						<span class="help-block">头部logo/尺寸：400x270</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 脚部logo</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image(flogo,$config['flogo'])}
						<span class="help-block">脚部logo/尺寸：375x110</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 头像1</label>
					<div class="col-sm-9 col-xs-12">
						{php echo tpl_form_field_image(target,$config['target'])}
						<span class="help-block">头像1/尺寸：100x125</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 细则</label>
					<div class="col-sm-9 col-xs-12">
						<textarea style="height:200px;" class="form-control richtext" name="dat[context]" cols="70" id="txt2">{$config['context']}</textarea>
						<span class="help-block">细则</span>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input name="submit" id="submit" type="submit" value="提交" class="btn btn-primary col-lg-1">
			<input name="id" value="{$id}" type="hidden"/>
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>
	</form>
</div>
<script type="text/javascript">
	require(['jquery', 'util'], function($, u) {
		$(function() {
			u.editor($('#txt2')[0]);
		});
		$("#form1").submit(function() {
			/*if ($.trim($(':text[name="question"]').val()) == "") {
				u.message("请填写问题", '', 'error');
				return false;
			}
			if ($.trim(u.editor($('.richtext')[0]).getContent()) == "") {
				u.message("请填写问题答案", '', 'error');
				return false;
			}
			if ($.trim($(':text[name="index"]').val()) == "") {
				u.message("请填写显示顺序", '', 'error');
				return false;
			}
			var num = $.trim($(':text[name="index"]').val());
			if (isNaN(num)) {
				u.message("显示顺序请填写数字", '', 'error');
				return false;
			}*/
			return true;
		});
	});
</script>
{template 'common/footer'}